package com.zhucan.account.infrastructure.db;

import com.zhucan.account.infrastructure.db.entity.AccountPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * author: zhuCan
 * date: 2020/8/4 19:58
 * description:
 */
@Repository
public interface AccountRepository extends JpaRepository<AccountPO, Long>, JpaSpecificationExecutor<AccountPO> {

  Optional<AccountPO> findByIdentityCard(String identityCard);

  Optional<AccountPO> findByAccountAndPassword(String account, String password);

}
